--234 420 225 125 9521 are cool seeds local IterationAmount = 11 local Branches = 2 print("Say a number, it'll be used as the seed for the fractal.") local Seed repeat Seed = tonumber(owner.Chatted:wait()) until Seed local Character = owner.Character local RootPart = Character.HumanoidRootPart local RunServicve = game:GetService("RunService") local Stepped = RunServicve.Stepped local Material = Enum.Material local Color3_new, Color3_fromRGB, Color3_fromHSV = Color3.new, Color3.fromRGB, Color3.fromHSV local Vector3_new, Vector2_new = Vector3.new, Vector2.new local UDim2_fromScale, UDim_new = UDim2.fromScale, UDim.new local CFrame_new, CFrame_Angles = CFrame.new, CFrame.Angles local pi, pi_2 = math.pi, math.pi * .5 local table_create, table_insert, table_clear = table.create, table.insert, table.clear local random = Random.new(Seed) local Part = Instance.new("Part", script) Part.Anchored = true Part.Locked = true Part.CanCollide = false Part.Material = Enum.Material.SmoothPlastic Part.Color = Color3_new() Part.Size = Vector3_new(5, 5) Part.CFrame = RootPart.CFrame do local function MoveScreen() local RootCF = RootPart.CFrame Part.CFrame = Part.CFrame:Lerp(RootCF + RootCF.LookVector * 5, .2) end Stepped:Connect(MoveScreen) end local Attachment0 = Instance.new("Attachment", Part) Attachment0.CFrame = CFrame_Angles(0, 0, pi_2) + Vector3_new(0, 2.5, .0255) local Attachment1 = Instance.new("Attachment", Part) Attachment1.CFrame = CFrame_Angles(0, 0, pi_2) + Vector3_new(0, -2.5, .0255) local ScreenBeam = Instance.new("Beam", script) ScreenBeam.Attachment0 = Attachment0 ScreenBeam.Attachment1 = Attachment1 ScreenBeam.Width0 = 5 ScreenBeam.Width1 = 5 ScreenBeam.Transparency = NumberSequence.new( { NumberSequenceKeypoint.new(0, .95), NumberSequenceKeypoint.new(.3, .8), NumberSequenceKeypoint.new(.7, .8), NumberSequenceKeypoint.new(1, .95) } ) ScreenBeam.Texture = "http://www.roblox.com/asset/?id=7102672681" ScreenBeam.LightInfluence = 0 ScreenBeam.LightEmission = 1 local Gui = Instance.new("SurfaceGui", owner.PlayerGui) Gui.Adornee = Part Gui.Face = Enum.NormalId.Back Gui.LightInfluence = 0 Gui.Brightness = 3 local Main = Instance.new("Frame", Gui) Main.Size = UDim2_fromScale(1, 1) Main.AnchorPoint = Vector2_new(.5, .5) Main.Position = UDim2_fromScale(.5, .5) Main.BackgroundTransparency = 1 local References = table_create(Branches) local ReferenceUICorner = Instance.new("UICorner") ReferenceUICorner.CornerRadius = UDim_new(1) local StartingColor = Color3_fromHSV(1, 0, 1) for i = 1, Branches do local _Reference = Instance.new("Frame") local Size = random:NextNumber(.5, .8) _Reference.Size = UDim2_fromScale(Size, Size * random:NextNumber(.975, 1.025)) _Reference.AnchorPoint = Vector2_new(.5, .5) _Reference.Position = UDim2_fromScale(random:NextNumber(.25, .75), random:NextNumber(.25, .75)) _Reference.Rotation = random:NextNumber(-360, 360) _Reference.BorderSizePixel = 0 _Reference.BackgroundTransparency = 1 _Reference.BackgroundColor3 = StartingColor ReferenceUICorner:Clone().Parent = _Reference table_insert(References, _Reference) end local CurrentLayers = table_create(Branches) for i, v in ipairs(References) do local ToInsert = v:Clone() ToInsert.Parent = Main table_insert(CurrentLayers, ToInsert) end local Iteration = 2 local Copied = 0 local PlotHz = random:NextNumber(1, 10) local Layers = table_create(IterationAmount) table_insert(Layers, CurrentLayers) warn("Generating seed:", Seed) for I = 1, IterationAmount do local Percent = 1 - I / IterationAmount local Color = Color3_fromHSV((Percent * PlotHz) % 1, 1, Percent) Iteration = Iteration * 2 local Current = table_create(Iteration) for i, V in ipairs(CurrentLayers) do for i, v in ipairs(References) do local new = v:Clone() Copied = Copied + 1 if Copied % 200 == 0 then wait(.3) end new.BackgroundColor3 = Color new.BackgroundTransparency = Percent new.Parent = V new.ZIndex = I table_insert(Current, new) end end table_insert(Layers, Current) CurrentLayers = Current end Gui.Parent = Part local MovmentEvent = Instance.new("RemoteEvent", owner) MovmentEvent.Name = "FractalMovment" do local TempTable = table_create(Branches ^ IterationAmount) local function OnMovment(Who, Action) if Who == owner then if Action == 1 then --Up Main.AnchorPoint -= Vector2_new(0, 1 / Main.Size.Y.Scale * .3) elseif Action == 2 then --Down Main.AnchorPoint += Vector2_new(0, 1 / Main.Size.Y.Scale * .3) elseif Action == 3 then --Left Main.AnchorPoint -= Vector2_new(1 / Main.Size.X.Scale * .3, 0) elseif Action == 4 then --Right Main.AnchorPoint += Vector2_new(1 / Main.Size.X.Scale * .3, 0) elseif Action == 5 then --ZoomIn local Size = Main.Size.X.Scale Main.Size = UDim2_fromScale(Size * 1.1, Size * 1.1) elseif Action == 6 then --ZoomOut local Size = Main.Size.X.Scale Main.Size = UDim2_fromScale(Size * .90909090909091, Size * .90909090909091) elseif Action == 7 then --Clear warn("Iterating...") Gui.Parent = owner.PlayerGui IterationAmount = IterationAmount + 1 local AbsoluteSize = Gui.AbsoluteSize.X local Iteration = Iteration * 2 local Current = table_create(Iteration) for i, V in ipairs(CurrentLayers) do local Branch, Found = V, nil repeat local Check = Branch.Parent if Check then if not TempTable[Check] then TempTable[Check] = true local Pos = Check.AbsolutePosition if Pos.X < 0 or Pos.X > AbsoluteSize then Found = Check elseif Pos.Y < 0 or Pos.Y > AbsoluteSize then Found = Check end else break end else break end until Found or Check.Parent == Gui if Found then Found:Destroy() else for i, v in ipairs(References) do local new = v:Clone() Copied = Copied + 1 if Copied % 200 == 0 then wait(.3) end new.BackgroundTransparency = 0 new.Parent = V new.ZIndex = IterationAmount table_insert(Current, new) end end end table_insert(Layers, Current) CurrentLayers = Current for i, v in ipairs(Layers) do local Percent = 1 - i / IterationAmount local Color = Color3_fromHSV((Percent * PlotHz) % 1, 1, Percent) for i, v in ipairs(v) do v.BackgroundTransparency = Percent v.BackgroundColor3 = Color end end table_clear(TempTable) Gui.Parent = Part warn("Iteration complete!\n", IterationAmount) end end end MovmentEvent.OnServerEvent:Connect(OnMovment) end NLS([[ local Humanoid = owner.Character.Humanoid local Cam = workspace.CurrentCamera local MovmentEvent = owner.FractalMovment local UIS = game:GetService("UserInputService") local Enum_KeyCode = Enum.KeyCode local w, a, s, d, q, shift = Enum_KeyCode.W, Enum_KeyCode.A, Enum_KeyCode.S, Enum_KeyCode.D, Enum_KeyCode.Q, Enum_KeyCode.LeftShift local Move = false UIS.InputBegan:Connect(function(Key) local KeyCode = Key.KeyCode if Move then if KeyCode == w then MovmentEvent:FireServer(1) elseif KeyCode == a then MovmentEvent:FireServer(3) elseif KeyCode == s then MovmentEvent:FireServer(2) elseif KeyCode == d then MovmentEvent:FireServer(4) elseif KeyCode == q then MovmentEvent:FireServer(7) end elseif KeyCode == shift then Cam.CameraType = Enum.CameraType.Fixed Humanoid.WalkSpeed = 0 Move = true end end) UIS.InputEnded:Connect(function(Key) if Key.KeyCode == shift then Cam.CameraType = Enum.CameraType.Custom Humanoid.WalkSpeed = 16 Move = false end end) local Mouse = owner:GetMouse() Mouse.WheelForward:Connect(function() if Move then MovmentEvent:FireServer(5) end end) Mouse.WheelBackward:Connect(function() if Move then MovmentEvent:FireServer(6) end end) --]], owner.PlayerGui) warn("Generation complete!\n Controls:\n WASD + Shift for movment\n Scroll + Shift for zooming in/out\n (DONT DO IT IF YOU ARENT ZOOMED IN)\n Q + Shift for iterating further\n (DONT DO IT IF YOU ARENT ZOOMED IN)")